package com.xhs.main.service.cwb.impl;

import com.xhs.main.dao.cwb.CwbMarketDao;
import com.xhs.main.dao.cwb.CwbPaytaxesDao;
import com.xhs.main.entity.cwb.CwbMarket;
import com.xhs.main.entity.cwb.CwbPaytaxes;
import com.xhs.main.service.cwb.CwbMarketService;
import com.xhs.main.service.cwb.CwbPaytaxesService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CwbPaytaxesServiceImpl implements CwbPaytaxesService {

    @Autowired
    CwbPaytaxesDao cwbPaytaxesDao;

    @Override
    public void addCwbPaytaxes(CwbPaytaxes cwbPaytaxes) {
        cwbPaytaxesDao.insertCwbPaytaxes(cwbPaytaxes);
    }

    @Override
    public List<CwbPaytaxes> getAllCwbPaytaxes() {
        List<CwbPaytaxes> cwbPaytaxes = cwbPaytaxesDao.selectAllCwbPaytaxes();
        return cwbPaytaxes;
    }

    @Override
    public CwbPaytaxes getOneByID(Integer cwbPId) {
        CwbPaytaxes cwbPaytaxes = cwbPaytaxesDao.selectOneByID(cwbPId);
        return cwbPaytaxes;
    }

    @Override
    public Double getjidumoney(String begindate, String enddate) {
        Double count = cwbPaytaxesDao.selectjidumoney(begindate, enddate);
        return count;
    }

    @Override
    public Double getAllMoney(String date) {
        Double money = cwbPaytaxesDao.selectAllMoney(date);
        return money;
    }

    @Override
    public Double getprofit(String date) {
        Double money = cwbPaytaxesDao.selectprofit(date);
        return money;
    }

    @Override
    public Integer getAllOpr() {
        Integer count = cwbPaytaxesDao.selectAllOpr();
        return count;
    }

    @Override
    public Integer getAllNoOpr() {
        Integer count = cwbPaytaxesDao.selectAllNoOpr();
        return count;
    }

}
